#ifndef LAYOUT_H
#define LAYOUT_H

#include "inc.h"
#include "record.h"
#include "slot.h"
#include "page.h"

/*
 * Header Layout
 */

#define USED_FALG_SIZE      sizeof(uint8_t)
#define USED_FALG_OFFSET    0
#define TABLE_TYPE_SIZE     sizeof(uint8_t)
#define TABLE_TYPE_OFFSET   (USED_FALG_OFFSET + USED_FALG_SIZE)
#define HEADER_SIZE         (USED_FALG_SIZE + TABLE_TYPE_SIZE)

/*
 * Slot Layout
 */

#define SLOT_SIZE   sizeof(slot_t)
#define SLOT_OFFSET HEADER_SIZE

/*
 * Data Layout
 */

#define DATA_OFFSET PAGE_SIZE

#endif  /* LAYOUT_H */